$(function () {
    // 接口函数
    $.ajax({
        type: "POST",
        url: "/kingticket/movie/fetchOpeningMovie",
        data: {fetch: 8},
        dataType: "json",
        success: function (data) {
            hotList.$data.items = data.data;
        },
        error:function(data){
            alert("error");
        }
    });

    $.ajax({
        type: "POST",
        url: " /kingticket/movie/fetchWaitingMovie",
        data: {fetch: 8},
        dataType: "json",
        success: function (data) {
            upList.$data.items = data.data;
        },
        error:function(data){
            alert("error");
        }
    });

});

var data = [

];

var movieCarde = Vue.component('movie-modele', {
    props: ['movieData'],
    template: '#tem-movie'
});

// 正在热映
var hotList = new Vue({
    el: '#home-hot',
    data: {
        items: data
    },
    methods: {
        getData: function (index) {
            return this.items[index];
        }
    }
});
// 即将上映
var upList = new Vue({
    el: '#home-up',
    data: {
        items: data
    },
    methods: {
        getData: function (index) {
            return this.items[index];
        }
    }
});

// 日历选择
var calendarDay = new Vue({
    el: '#cal-day',
    data: {
        item: data
    }
});